<template>
  <view>
    <view class="u-p-t-40">
      <view class="u-p-l-40 u-p-r-40">
        <u-section title="随机推荐" :show-line="false" :bold="false" :font-size="36" sub-title="更多" @click="x_redirect('/jjbz/list/list?type=ranking&id=hot')"></u-section>
      </view>
      <scroll-view scroll-x class="u-p-t-30" style="height: 380rpx;">
        <view class="u-flex u-row-left u-p-l-40 u-p-r-40">
          <!-- <block> -->
          <view class="tab" v-for="(item, index) in randList" >
            <image :src="item.thumbnail" style="width: 215rpx;height: 350rpx;" mode="aspectFill" @click="x_redirect('/jjbz/detail/detail?params='+JSON.stringify(item))"></image>
          </view>
          <!-- </block> -->
          <view class="" style="width: 40rpx;">ㅤ</view>
        </view>
      </scroll-view>
    </view>
  </view>

</template>
<script>

export default {
  name: "randImg",
  data() {
    return {
      randList:[]
    }
  },


  mounted: function () {
    this.getRandList();
  },

  methods: {
    async getRandList(){
      var t = this;
      t.x_request('api/wallpaper.image/rand', {}, function (t, res) {
        if (res.code === 1) {
          t.randList = res.data;
        }
      });
    }
  },
};
</script>
<style>


</style>
